<template>
  <a-modal v-model="visible" :footer="null" title="平台客服" width="40%">
    <a-spin :spinning="confirmSpin">
      <a-form-model
        ref="form"
        :model="configData"
        :rules="rules"
        :label-col="labelCol"
        :wrapper-col="wrapperCol">

        <a-form-model-item label="联系方式" prop="tel">
          <a-input v-model="configData.tel" placeholder="等待您填写平台客服联系方式" :style="disable?{color:'black'}:{}"
                   :disabled="disable"/>
        </a-form-model-item>

        <a-form-model-item :wrapper-col="{ span: 14, offset: 7 }" v-if="!disable">
          <a-button type="primary" style="width:100px;" @click="onSubmit">
            修改
          </a-button>
          <a-button style="margin-left: 20px;width:100px;" @click="resetForm">
            重置
          </a-button>
        </a-form-model-item>

      </a-form-model>
    </a-spin>
  </a-modal>
</template>
<script>
import {getAction, putAction} from "@/api/manage";
import {BoneCommonMixin} from "@/mixins/BoneCommonMixin";
import {ConfigDictMixins} from "@views/gospel/configCenter/mixins/ConfigDictMixins";

export default {
  name: "PlatformModal",
  mixins: [BoneCommonMixin, ConfigDictMixins],
  components: {},
  data() {
    return {
      description: "平台客服配置框",
      rules: {
        tel: [
          {required: true, message: '请输入客服电话', trigger: 'blur'},
          {min: 6, message: '请输入6个字符以上', trigger: 'blur'},
        ]
      },
      type: "platformConfig",
      configData: "",
      url: {
        configUpdate: "/config/customerService/plantForm",
      },
    }
  },
}
</script>

<style scoped>

</style>